# 检查是否是允许上传的图片文件
def allowed_pic_file(filetype):
    return filetype in ['image/jpg', 'image/png', 'jpeg']


# 获取文件根路径
def get_root_path(current_app):
    return current_app.instance_path.replace('\\instance', '')
